﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;

namespace pgnSoft.Veloz.ERP
{
    public class RouteConfig
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            //foreach (string language in global::Resources.languages.terms.Split(';'))
            //{
            //    routes.MapRoute(
            //        "Localization_" + language,
            //        language + "/{controller}/{action}/{id}",
            //        new { lang = language, controller = "Home", action = "Index", id = UrlParameter.Optional });
            //}

            routes.MapRoute(
                "Default", // Route name
                "{lang}/{controller}/{action}/{id}", // URL with parameters
                new {lang = "null", controller = "Main", action = "Index", id = UrlParameter.Optional } ,
                new[] { "pgnSoft.Veloz.ERP.Controllers" }

            );
        }
    }
}